/**
 * @Description: 用户信息接口
 * @author longfa liang
 * @date 2021/7/14
 */
var express = require('express');
var router = express.Router();
var userapi = require("../module/users")
/* GET users listing. */
router.get('/', function (req, res, next) {
    res.send('respond with a resource');
});
/*验证码登录*/
router.post('/smscode_login', async function (req, res, next) {
    userapi.smscode_login(req, res, next)
})
/*设置密码*/
router.post('/setting_pwd', async function (req, res, next) {
    userapi.settingpwd(req, res, next)
})
/*密码登录*/
router.post('/pwd_login', async function (req, res, next) {
    userapi.pwd_login(req, res, next)
})
/*找回密码*/
router.post('/find_pwd', async function (req, res, next) {
    userapi.find_pwd(req, res, next)
})
/*获取用户信息*/
router.post('/get_userinfo', async function (req, res, next) {
    userapi.get_userinfo(req, res, next)
})

/*获取用户信息*/
router.post('/update_userinfo', async function (req, res, next) {
    userapi.update_userinfo(req, res, next)
})
/*微信获取OPEN id*/
router.post('/getUserOpenId', async (req, res, next) => {
  userapi.getUserOpenId(req, res, next)
});
/*微信登录*/
router.post('/wechat_login', async (req, res, next) => {
  userapi.wechat_login(req, res, next)
});
/*微信绑定手机号*/
router.post('/wechat_bind_phone', async (req, res, next) => {
  userapi.wechat_bind_phone(req, res, next)
});


router.params.name = "user module"
module.exports = router;
